#include "./Graph/Edge.h"
#include "./Graph/Vertex.h"


#pragma warning (disable:4996)

CEdge::CEdge(CVertex beginVertex, CVertex endVertex)
{
	m_beginVertex = beginVertex;
	m_endVertex = endVertex;
	m_strID = m_beginVertex.GetID() + m_endVertex.GetID();
}

CEdge::CEdge(char* szBeginVertex, char* szEndVertex)
{
	m_beginVertex = CVertex(szBeginVertex);
	m_endVertex = CVertex(szEndVertex);
	m_strID = m_beginVertex.GetID() + m_endVertex.GetID();
}

CEdge::~CEdge()
{

}

bool CEdge::operator== (const CEdge& edge) const
{
	string strID = edge.GetID();
	return (m_strID == strID);
}

bool CEdge::operator> (const CEdge& edge) const
{
	string strID = edge.GetID();
	return (m_strID > strID);
}

bool CEdge::operator< (const CEdge& edge) const
{
	string strID = edge.GetID();
	return (m_strID < strID);
}

string CEdge::GetID() const
{
	return m_strID;
}
